<%#
#  Copyright 2009 Swansea University.
# 
#  Licensed under the Apache License, Version 2.0 (the "License");
#  you may not use this file except in compliance with the License.
#  You may obtain a copy of the License at
# 
#       http://www.apache.org/licenses/LICENSE-2.0
# 
#  Unless required by applicable law or agreed to in writing, software
#  distributed under the License is distributed on an "AS IS" BASIS,
#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#  See the License for the specific language governing permissions and
#  limitations under the License.
#  under the License.
%>

<% title "Manage system status settings" %>

<%= render(:partial=>"admin/navigation") %>

<p>This page summarizes the system seetings ordered by code.</p>

<% if @settings.blank? %>
  <p>No system status settings have been defined. <%= link_to "Create one now?", new_admin_status_setting_path %></p>
<%else%>
  <p><%= link_to "Current system status", admin_statuses_path %></p>
  <table>
    <thead>
      <tr>
        <th>Code</th><th>Message</th><th>Default permissions</th><th colspan="3">Actions</th>
      </tr>
    </thead>
    <tbody>
      <%= render(:partial => "status_settings_index", :collection => @settings) %>
    </tbody>
  </table>
  <p><%= link_to 'New system status setting', new_admin_status_setting_path %></p>
<%end%>